package com.ruoyi.consumer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.consumer.mapper.CDealPersonMapper;
import com.ruoyi.consumer.domain.CDealPerson;
import com.ruoyi.consumer.service.ICDealPersonService;

/**
 * 个人钱包流水记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-19
 */
@Service
public class CDealPersonServiceImpl implements ICDealPersonService 
{
    @Autowired
    private CDealPersonMapper cDealPersonMapper;

    /**
     * 查询个人钱包流水记录
     * 
     * @param dealRecordId 个人钱包流水记录主键
     * @return 个人钱包流水记录
     */
    @Override
    public CDealPerson selectCDealPersonByDealRecordId(Integer dealRecordId)
    {
        return cDealPersonMapper.selectCDealPersonByDealRecordId(dealRecordId);
    }

    /**
     * 查询个人钱包流水记录列表
     * 
     * @param cDealPerson 个人钱包流水记录
     * @return 个人钱包流水记录
     */
    @Override
    public List<CDealPerson> selectCDealPersonList(CDealPerson cDealPerson)
    {
        return cDealPersonMapper.selectCDealPersonList(cDealPerson);
    }

    /**
     * 新增个人钱包流水记录
     * 
     * @param cDealPerson 个人钱包流水记录
     * @return 结果
     */
    @Override
    public int insertCDealPerson(CDealPerson cDealPerson)
    {
        cDealPerson.setCreateTime(DateUtils.getNowDate());
        return cDealPersonMapper.insertCDealPerson(cDealPerson);
    }

    /**
     * 修改个人钱包流水记录
     * 
     * @param cDealPerson 个人钱包流水记录
     * @return 结果
     */
    @Override
    public int updateCDealPerson(CDealPerson cDealPerson)
    {
        cDealPerson.setUpdateTime(DateUtils.getNowDate());
        return cDealPersonMapper.updateCDealPerson(cDealPerson);
    }

    /**
     * 批量删除个人钱包流水记录
     * 
     * @param dealRecordIds 需要删除的个人钱包流水记录主键
     * @return 结果
     */
    @Override
    public int deleteCDealPersonByDealRecordIds(Integer[] dealRecordIds)
    {
        return cDealPersonMapper.deleteCDealPersonByDealRecordIds(dealRecordIds);
    }

    /**
     * 删除个人钱包流水记录信息
     * 
     * @param dealRecordId 个人钱包流水记录主键
     * @return 结果
     */
    @Override
    public int deleteCDealPersonByDealRecordId(Integer dealRecordId)
    {
        return cDealPersonMapper.deleteCDealPersonByDealRecordId(dealRecordId);
    }
}
